<script setup lang="ts">
import $api from '@/api'
import { watch,ref } from 'vue'
import RecordItem from './components/RecordItem.vue'
const favorites=ref([])
function init(){
  const {data}=$api.favorites.list()
  watch(data,(_data:Array<any>) =>{
    favorites.value=_data
  })
}
init()
</script>

<template>
  <div v-empty="favorites.length">
    <RecordItem v-for="(item,idx) in favorites" :item="item"/>
  </div>
</template>

<style scoped lang="scss">

</style>

<route>
{
  meta: {
    title: '商品收藏',
    auth: true
  }
}
</route>